Skip to content

refactor: extract render state - #93

Merged
zatevakhin merged 1 commit into
refactor/componentsfrom
refactor/render-state
Aug 21, 2026
Merged

refactor: extract render state#93
zatevakhin merged 1 commit into
refactor/componentsfrom
refactor/render-state

Conversation

@zatevakhin

Copy link
Copy Markdown
Collaborator

scope

  • based exactly on refactor/components@de5265356608bf051e18174151c6a6b452254710
  • limited to the approved 12-file source allowlist
  • adds one private render_state module and one App::render owner
  • moves exactly highlighter, card_cache, streaming_cache, streaming_thinking_cache, prev_total_height, and tick
  • keeps CardCache in ui/chat.rs and Highlighter in highlight.rs; moves StreamingCache from app.rs

preserved contracts

  • theme and session-switch invalidation clear all three caches
  • external-editor return clears card/content only; delegate updates clear card only
  • existing message/tool invalidation points, incremental batching, hidden-thinking behavior, width caches, and session isolation remain unchanged
  • wall-clock tick replacement, start-page glitches, spinners, layout/styles, and chat growth scroll compensation remain unchanged

validation

  • cargo fmt --all -- --check
  • cargo check --all-targets --all-features
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo build --all-targets --all-features
  • cargo test --all-targets --all-features — 895 passed, 0 failed, 0 ignored
  • git diff --check
  • boundary checks: 13 App fields, 6 RenderState fields, one private module, one owner, no old flat declarations/accesses, 4 phase 11 compatibility tags

explicitly pending

Integration, broad phase 4 acceptance, manual TUI smoke, phase 5, phase 8 final rendering architecture, and phase 11 cleanup are intentionally out of scope. The ignored roadmap checkpoint/history/checksum are unchanged.

@zatevakhin
zatevakhin merged commit 6009f20 into refactor/components Aug 21, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant